package co.yixiang.modules.system.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.stream.Stream;

/**
 * @author seven
 * @Package co.yixiang.modules.system.enums
 * @date 2020/9/4 18:21
 */
@Getter
@AllArgsConstructor
public enum ShopOrderTypeEnum {
    /**
     * 商店
     */
    STORE("1001","商店"),

    /**
     * 加油站
     */
    GAS("1002","加油站"),

    /**
     * 充电站
     */
    CHARGING_STATION("1003","充电站");

    private String value;

    private String desc;

    public static ShopOrderTypeEnum toType(String value) {
        return Stream.of(ShopOrderTypeEnum.values())
                .filter(p -> p.value.equals(value))
                .findAny()
                .orElse(null);
    }
    public String value() {
        return this.value;
    }
}
